public class Person {
    private int id;
    private String name;
    private String job;
    public Person() {
    }

    public Person(String name, String job) {
        this.name = name;
        this.job = job;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }
    public void login(){}
    public void register(){}
    public void talk(){}
}
class TestPerson{
    static Person[]people=new Person[2];
    static {
        people[0]=new Students("小黄","学生",18000);
        people[1]=new Teacher("白洁","老师",6666);
    }

    public static void main(String[] args) {
        for (Person p:people) {

            if(p  instanceof  Students) {
                Students m = (Students) p;
                m.test();
            }
            else if(p instanceof Teacher) {
                Teacher n = (Teacher) p;
                n.work();
            }
        }
    }
}
